<!--{*Part of the CEFIRO project by dyrtech.com.ve. Copyleft GPLv3 2007. Please see the disclaimer at the root of the project: http://dyrtech.com.ve/cefiro/license.txt*}-->

{if $numinstance < 2}
{if $headers == "true"}
<link rel="stylesheet" type="text/css" href="{$gridcss}">
<script src="{$commonjs}"></script>
<script src="{$gridjs}"></script>
<script src="{$gridcelljs}"></script>
{/if}
{/if}

{if $print_srcs == "true"}
<table border='0' cellspacing='5'>
	<tr>
		<td colspan="2">
			<div id="{$name}_msj" class="msg-grid"></div>
			<div id="{$name}" width="500px" height="90px" style="background-color:white;overflow:hidden"></div>
		</td>
	</tr>
</table>

    {foreach name=arrayTitle item=title from=$arrayTitle}
        <td>
            {$title}
        </td>
    {/foreach}
	{section name=i loop=$table}
		<option value="{$table[i].$value}" {if $table[i].$value==$selected}selected{/if}>
			{$table[i].$option}
		</option>
	{/section}
{/if}

{if $print_scripts == "true"}
{if $script_tag == "true"}
<script>
{/if}
	{$name}= new dhtmlXGridObject("{$name}");
	{$name}.setDelimiter("{$delimiter}");
	{$name}.setHeader("{section name=i loop=$headers}{$headers[i]}{if i<$fields}{$delimiter}{/if}{/section}");
	{$name}.setInitWidths("{section name=i loop=$widths}{$widths[i]}{if i<$fields}{$delimiter}{/if}{/section}");
	{$name}.setColAlign("{section name=i loop=$aligns}{$aligns[i]}{if i<$fields}{$delimiter}{/if}{/section}");
	{$name}.setColTypes("{section name=i loop=$types}{$types[i]}{if i<$fields}{$delimiter}{/if}{/section}");
	{$name}.setColSorting("{section name=i loop=$sortings}{$sortings[i]}{if i<$fields}{$delimiter}{/if}{/section}");
	{$name}.setImagePath("{$gridimg}");
	{$name}.enableBuffering("{$buffering}");

	{$name}.setOnRowSelectHandler({$row_select_handler});
	{$name}.enableMultiselect({$multiselect});
	{if $extra}{$extra}{/if}
	{$name}.init();
{if $script_tag == "true"}
</script>
{/if}
{/if}

